<?php


namespace app\admin\validate;

class UserValidate extends BaseValidate
{
    protected $rule = [
        'username' => 'require',
        'nickname' => 'require',
        'password' => 'require',
        'captcha' => 'require|captcha',
    ];

    protected $message = [
        'username.require' => '请输入用户名',
        'nickname.require' => '请输入昵称',
        'password.require' => '请输入密码',
        'captcha.require' => '请输入验证码',
        'captcha.captcha' => '验证码错误',
    ];

    protected $scene = [
        'admin_login' => ['username', 'password', 'captcha'],
        'create' => ['username', 'nickname', 'password'],
        'update' => ['username', 'nickname'],
    ];
}